﻿@using FCZLM.Core.Models
@model FCZLM.Core.Models.ProductUrls
@{
    ViewData["Title"] = "商品详情列表页";
    var producturls = ViewBag._productUrlsRepository as List<ProductUrls>;
    Layout = null;
}
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <link href="/layui/css/layui.css" rel="stylesheet" />
</head>
<body>
    <div>
        <div class="layui-card">
            <div class="layui-card-header">商品详情</div>
            <div class="layui-card-body">
                <form class="layui-form">

                    @*<input type="hidden" name=" Id" value="@Model.Id" />*@
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品图片</label>
                        <div class="layui-input-block">
                            <input type="text" value="@Model.PicUrl" name="PicUrl" required lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                   

                </form>
            </div>
        </div>
        <script src="/layui//layui.js"></script>
        <!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->

        <script>
            layui.use(["form", 'layer', 'layedit'], function () {

                var form = layui.form;

                var $ = layui.$;//引入layui组件
                var layedit = layui.layedit;



                form.on('submit(editForm)', function (data) {

                    $.post("/forder/index2", data.field, function (res) {

                        if (res.isSuccess) {

                            layer.msg(res.msg, function () {

                                parent.window.location.href = "/forder/index2"//parent加上它是父页面做跳转

                            });

                        } else {

                            layer.msg(res.msg)

                        }

                    });

                    return false;

                });

            });
        </script>
</body>
</html>
